/**
 * 
 */
package co.fitstart.coach.dao;

import com.demo2do.core.persistence.annotation.Dynamic;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;

import co.fitstart.entity.coach.CoachSettlement;
import co.fitstart.entity.course.Course;
import co.fitstart.entity.principal.Principal;

/**
 * @author downpour
 *
 */
@Dynamic("hibernate")
public interface SalaryDao {
    
    /**
     * 
     * @param coach
     * @param course
     * @return
     */
    @Query("FROM CoachSettlement coachSettlement WHERE coachSettlement.principal = :coach AND coachSettlement.course = :course")
    public CoachSettlement loadCoachSettlement(@Variable("coach")Principal coach, @Variable("course")Course course);
}
